package com.tm.config;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import  org.springframework.stereotype.Component;

//2.创建一个拦截器工厂 继承AbstractGatewayFilterFactory
//我们自己创建的拦截器工厂名称要以GatewayFilterFactory
//在配置文件里filters中添加我们创建的拦截器工厂的名称缩写进去
@Component
public class OrderGatewayFilterFactory extends AbstractGatewayFilterFactory {
    public GatewayFilter apply(Object config) {
        return new OrderGateway();
    }
}
